<template>
	<view class="functionArea">
		<view class="item" v-for="(item,index) in tableData" :key="index">
			<view class="circle"></view>
			<view class="word">{{ item.label }}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tableData:[]
			}
		},
		created() {
			this.getTableData()
		},
		methods: {
			getTableData(){
				let array = [
					{id:1,label:'九田家商城',picImg:''},
					{id:2,label:'九田家外卖',picImg:''},
					{id:3,label:'限时折扣',picImg:''},
					{id:4,label:'特惠购物',picImg:''},
					{id:5,label:'拼团购物',picImg:''},
					{id:6,label:'积分商城',picImg:''},
					{id:7,label:'附近门店',picImg:''},
					{id:8,label:'会员特惠',picImg:''},
					{id:9,label:'线下福利',picImg:''},
					{id:10,label:'调味添加',picImg:''},
					{id:11,label:'双11专场',picImg:''},
					{id:12,label:'线下福利',picImg:''}
				]
				
				if(array.length > 9){
					array = array.slice(0,9)
					array.push({id:0,label:'更多',picImg:''})
					this.tableData = array
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.functionArea {
		width: 100%;
		padding: 15rpx 10rpx 15rpx 10rpx;
		box-sizing: border-box;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		.item{
			width: 20%;
			display: flex;
			flex-wrap: wrap;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			margin-bottom: 20rpx;
			.circle{
				width: 100rpx;
				height: 100rpx;
				background-color: #eaeaea;
			}
			.word{
				font-size: 24rpx;
				margin-top: 10rpx;
				color: #0b0904;
			}
		}
	}
</style>